﻿using System;
using System.Web;

namespace METU_CMT.Business
{
    public class Deliverable
    {
        public DateTime UploadTime { get; set; }

        public string DocType { get; set; }

        public string File { get; set; }

        public Event Event { get; set; }

        public int DeliverableId { get; set; }

        public string RealFileName { get; set; }

        public int SubmitterId { get; set; }

        public void Download()
        {
            FileType _type = CommonMethods.GetFileType(DocType);
            CommonMethods.DownloadFile(HttpContext.Current.Response, HttpContext.Current.Server.MapPath("~/StudentDocuments/" + File), _type);
        }
    }
}